class CreateAdverts < ActiveRecord::Migration
  def self.up
    create_table :adverts do |t|
      
      t.string :name
      t.string :advertiser_name
      t.integer :max_views
      t.integer :view_count
      t.boolean :is_active
      t.integer :user_id
      
      t.boolean :is_iframe
      t.text :iframe_src
      
      t.boolean :is_script
      t.text :script_content
      
      t.boolean :is_image_banner
      t.string :image_banner_src
      t.string :image_banner_href
      
      t.boolean :is_custom_banner
      t.string :custom_banner_image_file_name
      t.string :custom_banner_image_content_type
      t.integer :custom_banner_image_file_size
      t.datetime :custom_banner_image_file_updated_at
      t.string :custom_banner_href
      
      t.timestamps
    end
  end
  
  def self.down
    drop_table :adverts
  end
end
